package com.hefeng.unit.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hefeng.unit.domain.GyDeviceUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface GyDeviceUserMapper extends BaseMapper<GyDeviceUser> {
    List<Map<String,String>> getUserBindingDevice();

    @Select("SELECT\n" +
            "\tgy_device_user.user_id,gy_device_user.phone\n" +
            "FROM\n" +
            "\tgy_device_user\n" +
            "WHERE\n" +
            "\tgy_device_user.is_delete = 1 AND\n" +
            "\tgy_device_user.device_code = #{deviceCode}")
    GyDeviceUser getUser(String deviceCode);

}
